<template>
 <div>
     <h1>Son2</h1>
 </div>
</template>

<script>
export default {
 data(){
 return{}
 },
 created(){},
 methods:{},
 components:{},
  beforeRouteEnter (to, from, next) {
     console.log('组件进入守卫');
     console.log(this)
     next();
 },
 beforeRouteLeave (to, from, next) {
     console.log('组件离开守卫');
     console.log(this)
     next()
 },
}

</script>
<style scoped>
</style>